package net.koodar.forge.log.event;

import lombok.*;
import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * 登录日志
 *
 * @author liyc
 */

@Data
@ToString(callSuper = true)
public class LoginLogEvent extends ApplicationEvent {

	/**
	 * 用户id
	 */
	private Long userId;

	/**
	 * 用户名
	 */
	private String userName;

	/**
	 * 登录ip
	 */
	private String loginIp;

	/**
	 * user-agent
	 */
	private String userAgent;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 登录类型
	 */
	private Integer loginResult;

	public LoginLogEvent(Object source) {
		super(source);
	}

	public LoginLogEvent(Object source, Clock clock) {
		super(source, clock);
	}
}
